---
title: "Builds"
slug: /cookbook/builds
description: "Learn how to build and test your applications using Dagger with practical examples."
---

import MultiStageBuild from '@cookbookBuild/_multi-stage.mdx';
import MatrixBuild from '@cookbookBuild/_matrix-build.mdx';
import BuildMultiArch from '@cookbookBuild/_multi-arch.mdx';
import BuildMultiArchCC from '@cookbookBuild/_multi-arch-cross-compilation.mdx';
import BuildImageFromDockerfile from '@cookbookBuild/_image-from-dockerfile.mdx';
import BuildImageFromDockerfileContext from '@cookbookBuild/_image-from-dockerfile-build-context.mdx';
import OciAnnotations from '@cookbookBuild/_oci-annotations.mdx';
import OciLabels from '@cookbookBuild/_oci-labels.mdx';
import InvalidateCache from '@cookbookBuild/_invalidate-cache.mdx';
import CacheDependencies from '@cookbookBuild/_cache-dependencies.mdx';
import ExecuteConcurrently from '@cookbookBuild/_execute-concurrently.mdx';
import PersistServiceState from '@cookbookBuild/_persist-service-state.mdx';

This page contains practical examples for building artifacts (files and directories) with Dagger. Each section below provides code examples in multiple languages and demonstrates different approaches to building artifacts.

<MultiStageBuild />

<MatrixBuild />

<BuildMultiArch />

<BuildMultiArchCC />

<BuildImageFromDockerfile />

<BuildImageFromDockerfileContext />

<CacheDependencies />

<ExecuteConcurrently />

<PersistServiceState />

<OciAnnotations />

<OciLabels />

<InvalidateCache />
